package responsibilitychain;

/**
 * 测试
 * @author Fengdong.Duan
 * @create 2023/12/5 15:06
 */
public class Client {
    public static void main(String[] args) {
        Approver teachingDirector = new TeachingDirector();
        Approver dean = new Dean();
        Approver viceChancellor = new ViceChancellor();
        Approver chancellor = new Chancellor();

        teachingDirector.setNext(dean);
        dean.setNext(viceChancellor);
        viceChancellor.setNext(chancellor);

        teachingDirector.handleRequest(new PurchaseRequest(3000, "Projector"));
        teachingDirector.handleRequest(new PurchaseRequest(8000, "Laptop"));
        teachingDirector.handleRequest(new PurchaseRequest(15000, "Lab Equipment"));
        teachingDirector.handleRequest(new PurchaseRequest(40000, "Server"));
    }
}
